package com.jinke.api.modules.third.dqpost.model.request;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;

import java.io.IOException;

@Data
public class TrackingRequest extends BaseEntity {
    private String trackingno;
    public static void main(String[] args) {
        String jsonInput = "{\"apikey\":\"xxx\",\"apisecret\":\"xxx\",\"orderids\":[\"a007\",\"a006\"]}";

        try {
            ObjectMapper objectMapper = new ObjectMapper();
            TrackingRequest orderRequest = objectMapper.readValue(jsonInput, TrackingRequest.class);

            // 现在你可以使用 orderRequest 对象来访问转换后的数据
            System.out.println("API Key: " + orderRequest.getApikey());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
